package thread;

/**
 * Created by mikey.zhao on 2015/4/3.
 */
public class ThreadTester extends Thread {
    private long spleeptime;


    public ThreadTester(long spleeptime) {
        this.spleeptime = spleeptime;
    }

    public long getSpleeptime() {
        return spleeptime;
    }

    public void setSpleeptime(long spleeptime) {
        this.spleeptime = spleeptime;
    }


    @Override
    public void run() {
        System.out.println("spleep time:" + this.getSpleeptime());
        try {
            Thread.sleep(this.getSpleeptime());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("spleep end");
    }
}
